package com.eh.reflectoin.dto;

/**
 * Created by David on 2016/4/29.
 */
public class MethodInvokerRequest {
    private Object bean;
    private String methodName;
    private Object[] args;

    public static class Builder {
        private Object bean;
        private String methodName;
        private Object[] args;

        public Builder bean(Object bean) {
            this.bean = bean;
            return this;
        }

        public Builder methodName(String methodName) {
            this.methodName = methodName;
            return this;
        }

        public Builder args(Object[] args) {
            this.args = args;
            return this;
        }

        public MethodInvokerRequest build() {
            return new MethodInvokerRequest(this);
        }
    }

    private MethodInvokerRequest(Builder b) {
        this.bean = b.bean;
        this.methodName = b.methodName;
        this.args = b.args;
    }

    public Object getBean() {
        return bean;
    }

    public String getMethodName() {
        return methodName;
    }

    public Object[] getArgs() {
        return args;
    }
}
